package com.zx.flow.api.execute.request;

import com.zx.flow.api.execute.model.FlowOperator;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import jakarta.validation.constraints.NotEmpty;
import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@Schema(title = "流程-进入节点", description = "流程-进入节点")
public class FlowParamNodeEntry extends FlowParam {

    @Schema(description = "进入节点code", example = "5cf79580-07c9-4bf1-b061-51561a6748ee", requiredMode = RequiredMode.REQUIRED)
    @NotEmpty(message = "进入节点code不能为空")
    private String nodeCode;

    @Schema(description = "强制指定操作人，如果设置该属性，就不会触发获取操作人的步骤", requiredMode = RequiredMode.REQUIRED)
    private List<FlowOperator> operators;

    @Schema(description = "强制制定上游节点", requiredMode = RequiredMode.REQUIRED)
    private String nodeFormId;

    public FlowParamNodeEntry(String id, String nodeCode, List<FlowOperator> operators) {
        this.setId(id);
        this.nodeCode = nodeCode;
        this.operators = operators;
    }
}
